<?php
   require("../../config.php");
   $identreprise=$_GET['x'] ;
   $idrecherche=$_GET['y'];
   echo "<br/>$identreprise , __,$idrecherche "; 
   $req = "DELETE FROM recherche_competence where  idrecherche=$idrecherche ";
   mysql_query($req);
   $req2="DELETE FROM recherche where  idrecherche=$idrecherche  and  identreprise=$identreprise"; 
   mysql_query($req2);
   echo "<br/>  $req2";  
   
   /*
   $req="select idrecherche from recherche where identreprise=$identreprise;";
   echo "".$req;   
   if($result = mysql_query($req)){
       while($ligne = mysql_fetch_array($result)){ 
         $idr=$ligne['idrecherche'] ;
         $req1="DELETE FROM recherche_competence where idrecherche=$idr;";            
         mysql_query($req1);
        echo" <br> $req1";
      }
      $req2="DELETE FROM recherche where identreprise=$identreprise;"; 
      echo" <br> $req2"; 
       mysql_query($req2);
   }
   */
   header('Location: ./rechercheCandidats.php '); 
   
   
   
   
                                                                          
?>
